﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmallTune.Models
{
    public class Album
    {
        public virtual int Id { get; set; }
        public virtual string name { get; set; }
        public virtual int yearOfRelease { get; set; }
        public virtual IList<Song> listOfSongs { get; set; }
        public virtual IList<Artist> listOfArtists { get; set; }
        public virtual IList<Genre> listOfGenres { get; set; }
        public virtual DateTime lastChanged { get; set; }
        public virtual DateTime created { get; set; }

        public Album()
        {
            listOfArtists = new List<Artist>();
            listOfSongs = new List<Song>();
            listOfGenres = new List<Genre>();
        }

        public virtual void AddSong(Song song)
        {
            song.listOfAlbums.Add(this);
            listOfSongs.Add(song);
        }

        public virtual void AddGenre(Genre genre)
        {
            genre.listOfAlbums.Add(this);
            listOfGenres.Add(genre);
            
        }

        
    }
}
